package com.bwie.enums;

import lombok.Data;

/**
 * @author: 作者
 * @create: 2025-01-09 11:18
 * @Description: TODO
 * <p>
 * RuntimeExctption  运行时异常父类
 */
public enum ResultStatus {

    USER_LIST_SUCCESS("用户查询成功", 2001),
    USER_UPDATE_SUCCESS("用户修改成功", 2001),
    USER_DELETE_SUCCESS("用户删除成功", 2001),
    USER_ADD_SUCCESS("用户添加成功", 2002),
    AR_LIST_SUCCESS("文章列表查询成功", 2010),
    AR_REMOVE_SUCCESS("文章删除成功", 2011),
    AR_ADD_SUCCESS("文章添加成功", 2012),
    USER_LIST_ERROR("用户查询失败", 4001),
    USER_ADD_ERROR("用户添加失败", 4002),
    AR_ID_NOT_FIND("文章主键不存在", 4010),
    AR_ID_IS_NULL("文章主键为空", 4011);


    private String msg;
    private Integer code;

    ResultStatus(String msg, Integer code) {
        this.msg = msg;
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
